package com.jimmy.medical.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

/**
 * @Desc: 订单操作历史记录表

 * @author jimmy

 * @date 2015-10-16 下午10:50:17
 */
@Entity
@Table(name = "order_history")
public class OrderHistory extends AbstractEntity {
	
	/**操作名称*/
	@Column(name = "title")
	private String title;
	
	/**操作说明*/
	@Column(name = "message")
	private String message;
	
	/** 对应的订单*/
	@ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "order_id")
    @NotFound(action = NotFoundAction.IGNORE)
    private Order order;
	
    /** 操作人*/
	@Column(name = "create_user")
	private String createUser;
	
	/**操作时间*/
	@Column(name = "create_time", length = 20)
	private String createTime;

	public OrderHistory(String title, String message, Order order, String createUser, String createTime) {
		this.title = title;
		this.message = message;
		this.order = order;
		this.createUser = createUser;
		this.createTime = createTime;
	}
	
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public Order getOrder() {
		return order;
	}

	public void setOrder(Order order) {
		this.order = order;
	}

	public String getCreateUser() {
		return createUser;
	}

	public void setCreateUser(String createUser) {
		this.createUser = createUser;
	}

	public String getCreateTime() {
		return createTime;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}
}
